<template>
  和为{{sum}},当前鼠标坐标为   x:{{point.x}},y:{{point.y}}
  <br>
  <button @click="sum++">加一</button>
</template>

<script>
import { ref,reactive,onMounted,onBeforeUnmount} from "vue";
import usePoint from "../hooks/usePoint";
export default {
  
  name:"Demo",
  setup(props,context) {
    let sum = ref(0)
    let point = usePoint()

    // 暴露数据
    return {
     sum,point
    }
    
  },
}
</script>

<style>
  button {
    margin: 3px 10px;
  }
</style>